#!/bin/sh /etc/rc.common
# Copyright (C) 2012 OpenWrt.org

START=99
APP=snort.bin
BIN_FILE="/usr/bin/"$APP
PID_FILE="/var/run/"$APP"_"$INTERFACE".pid"
OPTIONS="--daq-dir /usr/lib/daq/"
DEFAULT=/etc/default/snort
LOG_D=/var/log/snort

start() {
	[ -d $LOG_D ] || mkdir -p $LOG_D
	start-stop-daemon -S -x $APP -p $PID_FILE -b -m -- $OPTIONS
}

stop() {
	start-stop-daemon -K -x $APP -p $PID_FILE -s TERM
	rm -rf $PID_FILE
}
